package com.cy.jxc.controller;

import com.cy.jxc.utils.ShiroUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

/**
 * rest方式控制mvc页面跳转
 */

@Controller
public   class PageController{
    @RequestMapping("/login")
    public  String PageTo(){
        return  "login";
    }
    @RequestMapping("/toregister")
    public  String pageToRegist(){
        return "register";
}
    @RequestMapping("/index")
    public String pageToIndex(Model model){
        String userName = ShiroUtils.getUserName();
        model.addAttribute("user",userName);
        return  "index";
    }
    @RequestMapping("/goods")
    public  String toGoods(){
        return  "goods";
    }
    @RequestMapping("/index_jumbotron")
    public  String toIndex_jumbotron(){
        return "index_jumbotron";
    }

    @RequestMapping("/resposity")
    public String toResposity(){
        return  "resposity";
    }
    @RequestMapping("/register")
    public String toRegister(){
        return  "register";
    }

    @RequestMapping("/systemsetting")
    public  String toSystemSetting(){
        return "systemsetting";
    }
    @RequestMapping("/doPageUI")
    public String toPageUi(){
        return "page";
    }
    @RequestMapping("/client")
    public  String toClient(){
        return "client";
    }
    @RequestMapping("/clientadd")
    public String toClientAdd(){
        return "clientadd";
    }

    @RequestMapping("/usersetting")
    public String toUserSetting(){
        return  "usersetting";
    }
/*
@Controller
public class PageController {
    @RequestMapping("/{model}")
    public String pageTo(@PathVariable String model){
//        System.out.println("111");
        return model;
    }
*/


}


